package org.dydl.dao.system.repository;

import java.util.List;

import org.dydl.model.system.Area;
import org.dydl.model.system.AreaList;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface IAreaListRepository extends CrudRepository<AreaList, Integer>,
		JpaSpecificationExecutor<AreaList> {

	
	@Query(value = "SELECT * FROM arealist WHERE BUSINESS_ID = :businessId ORDER BY CREATE_TIME DESC",nativeQuery=true)
	List<AreaList> getAreaList(@Param("businessId") String businessId );
	
	
	
	
	

}
